package cn.wolfcode.mapper;

import cn.wolfcode.domain.Permission;
import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface PermissionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    int updateByPrimaryKey(Permission record);

    List<Permission> selectAll();

    /*
    * 查询分页
    * */
    List<Permission> queryList(QueryObject qo);

    /**
     * 查询某个角色的所有权限
     * @param roleId 角色的id
     * @return*/

    List<Permission> QueryPermissionsForRole(Long roleId);

    /**
     * 查询所有的expression
     * @return
     */
    List<String> selectExpressionList();
}